package com.czk.controller;

import com.czk.service.UserService;
import com.czk.utils.ResultUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/4/6 14:13
 */
@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("/server2")
    public Object insert() {
        try {
            System.out.println("访问8082");
            userService.insert("nzq");
            return ResultUtils.success();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return ResultUtils.error();

    }
}
